/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Server;

import Common.Message;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.Objects;

/**
 *
 * @author Lab-214-21
 */
public class UserMessages implements Serializable {
    private String user;
    private LinkedList<Message> messages;

    public UserMessages() {
    }
    
    public UserMessages(String user) {
        this.messages = new LinkedList<>();
        this.user = user;
    }

    @Override
    public String toString() {
        return "UserMessages{" + "user=" + user + ", messages=" + messages + '}';
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 59 * hash + Objects.hashCode(this.user);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final UserMessages other = (UserMessages) obj;
        if (!Objects.equals(this.user, other.user)) {
            return false;
        }
        return true;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public LinkedList<Message> getMessages() {
        return messages;
    }

    public void setMessages(LinkedList<Message> messages) {
        this.messages = messages;
    }
    
    
}
